<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
body {
		font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #4f6b72;
		background: #E6EAE9;
}

a {
		color: #c75f3e;
}

#mytable {
		padding: 0;
		margin: 0;
}

caption {
		padding: 0 0 5px 0;
		width: 700px;
		font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		text-align: right;
}

th {
		font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #4f6b72;
		border-right: 1px solid #C1DAD7;
		border-bottom: 1px solid #C1DAD7;
		border-top: 1px solid #C1DAD7;
		letter-spacing: 2px;
		text-transform: uppercase;
		text-align: left;
		padding: 6px 6px 6px 12px;
		background: #CAE8EA;
}

th.nobg {
		border-top: 0;
		border-left: 0;
		border-right: 1px solid #C1DAD7;
		background: none;
}

td {
		border-right: 1px solid #C1DAD7;
		border-bottom: 1px solid #C1DAD7;
		background: #fff;
		font-size: 11px;
		padding: 6px 6px 6px 12px;
		color: #4f6b72;
}

td.alt {
		background: #F5FAFA;
		color: #797268;
}

th.spec {
		border-left: 1px solid #C1DAD7;
		border-top: 0;
		background: #fff;
		font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
		border-left: 1px solid #C1DAD7;
		border-top: 0;
		background: #f5fafa;
		font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: #797268;
}

body.td {
		font-size: 11px;
}
</style>
</head>
<body>
  <fieldset>
    <legend>申请</legend>
    <!-- 此是普通用户，也就是变量owner的处理页面，不管当前登陆什么角色，统一提交完成任务的请求即可，
   	在submit.jsp里调用完成任务的API，至于会如何完成,完全由流程定义图决定，我们编程只管调用完成即可 
    -->
    <form action="submit.action" method="post">
      <input type="hidden" name="processVo.taskId" value="${param.id}">
      <!-- 此处的owner与day两个name值要与流程图中定义的一致,owner是在xml中定义的变量，不属于具体登陆者 -->
      申 请 人：<input type="text" name="processVo.owner" value="<s:property value='user.userName'/>" readonly="readonly"/><br/>
  请假时间：<input type="text" name="processVo.day" value=""/><br/>
    请假原因：<textarea name="processVo.reason"></textarea><br/>
    <input type="submit" value="提交"/>
    </form>
    <s:if test="flowProcessList!=null">
		    <table border="1" width="100%">
				<caption>当前实例办理情况</caption>
				<thead>
						<tr>
								<th class="spec">流程ID</th>
								<th>节点名称</th>
								<th>开始时间</th>
								<th>结束时间</th>
								<th>参与人员</th>
						</tr>
				</thead>
				<tbody>
						<s:iterator value="flowProcessList">
						<tr>
								<th class="spec">${dbid}</th>
								<th class="alt">${activityName}</th>
								<th class="alt">${startTime}</th>
								<th class="alt"><s:if test="endTime!='null'">${endTime}</s:if></th>
								<th class="alt">${assignee}</th>
						</tr>
						</s:iterator>
				</tbody>
		</table>
	</s:if>
  </fieldset>
</body>
</html>